# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dua
pkgver=2.29.4
pkgrel=0
pkgdesc="Tool to conveniently learn about the usage of disk space"
url="https://github.com/Byron/dua-cli"
license="MIT"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/Byron/dua-cli/archive/v$pkgver/dua-$pkgver.tar.gz"
builddir="$srcdir/dua-cli-$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
a8f6487f906639fcd0abac1b43b61e5dee11678e0a3cca7d425aee1b3bbe38704765626e13b32180c78bc82458b519ac891953cad31755514da58059cc2b0d27  dua-2.29.4.tar.gz
"
